﻿#ifndef EXCEPTIONS_H
#define EXCEPTIONS_H
#include <QString>
#include <QMap>

typedef QMap<QString, QString> ErrorMap;

/// @brief 异常类
///
class BaseException
{
private:
    QString m_code;
    QString m_msg;

public:
    BaseException(const QString& code, const QString& msg);
    QString msg() const;
    QString code() const;

private:
    static ErrorMap parseErrorCode(const QString& csvPath);
    static void generateErrorCodeHFile(
            const QString& csvPath,
            const QString& targetPath);
};

#endif // EXCEPTIONS_H
